﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;
namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IRate
    {
        [OperationContract]
        int Rate_Using(int RateID);

        [OperationContract]
        DataSet Rate_GetAll();

        [OperationContract]
        RateInfo Rate_GetInfo(int RateID);

        [OperationContract]
        RateInfo Rate_GetInfoByDate(DateTime _DateVal);

        [OperationContract]
        DataSet Rate_GetList( out int ItemCount,int currentPage, int pageSize);

        [OperationContract]
        int Rate_Insert(RateInfo eInfo);

        [OperationContract]
        bool Rate_Update(RateInfo eInfo);

        [OperationContract]
        bool Rate_Delete(int RateID);

        [OperationContract]
        RateInfo Rate_GetMax();

        [OperationContract]
        bool Rate_CheckDate(DateTime _FromDate, DateTime _ToDate);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class RateInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
      

        DateTime _Month;
        [DataMember]
        public DateTime Month
        {
            get { return _Month; }
            set { _Month = value; }
        }

        decimal _Social;
        [DataMember]
        public decimal Social
        {
            get { return _Social; }
            set { _Social = value; }
        }

        decimal _Medical;
        [DataMember]
        public decimal Medical
        {
            get { return _Medical; }
            set { _Medical = value; }
        }

        decimal _Unemployed;
        [DataMember]
        public decimal Unemployed
        {
            get { return _Unemployed; }
            set { _Unemployed = value; }
        }
        
        decimal _Remain;
        [DataMember]
        public decimal Remain
        {
            get { return _Remain; }
            set { _Remain = value; }
        }
        string  _Discription;
        [DataMember]
        public string Discription
        {
            get { return _Discription; }
            set { _Discription = value; }
        }
    }

}
